package com.blockchain.console.service.common;

import java.sql.SQLException;

import com.blockchain.framework.http.session.authentication.AuthenticationException;
import com.blockchain.framework.service.Service;

public abstract interface LoginManage extends Service {

	/**
	 * 
	 * <dt>
	 * <dl>
	 * 描述：记录登录日志.
	 * </dl>
	 * </dt>
	 * 
	 * @param accountName
	 *            账号名称
	 * @param ip
	 *            登录IP
	 * @param success
	 *            是否成功
	 * @throws Throwable
	 * 
	 */
	public abstract void log(int accountId,String ip) throws Throwable;

	/**
	 * 描述： 修改登录密码
	 * 
	 * @param oldPassWord
	 *            原密码
	 * @param newPassWord
	 *            新密码
	 * @throws Throwable
	 * 
	 */
	public void updatePassWord(String oldPassWord, String newPassWord)
			throws Throwable;

	/**
	 * 查询出登录用户ID
	 * 
	 * @param accountName
	 * @param password
	 * @return
	 * @throws Throwable
	 */
	public abstract int readAccountId(String accountName, String password)
			throws AuthenticationException, SQLException;

}
